package FactoryPattern;

public class ShapeFactory {

    public Shape createShape(String shapeType) {
        if (shapeType.equals("circle")) {
            return new Circle();
        } else if (shapeType.equals("rectangle")) {
            return new Rectangle();
        }else{
            return new DefaultShape();
        }
    }
}
